<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>

</html>

<script>
    var arr = [12, 69, 78, 56, 34, 25, 28]
    for (i = 0; i < arr.length-1 ; i++) {
        for (j = 0; j < arr.length-1; j++) {
            if (arr[j] > arr[j + 1]) {
                var b = [];
                b = arr[j];
                arr[j] = arr[j + 1];
                arr[j + 1] = b;
            }
        }
    }
    document.write(arr)
</script>